Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Quick Cutto" ROI function #1576

Merged
merged 32 commits into from
Aug 16, 2024
Merged

Add "Quick Cutto" ROI function #1576

merged 32 commits into from
Aug 16, 2024

Conversation

HaleySchuhl
Copy link
Contributor

@HaleySchuhl HaleySchuhl commented Aug 7, 2024

Describe your changes
A much faster method to making filtered binary and labeled masks from one or more ROIs. Plan to merge this functionality into other plantcv functions in further PRs.

Type of update
Is this a:

  • feature enhancement

Associated issues
Reference associated issue numbers. Does this pull request close any issues?

Additional context
The iterative nature of pcv.roi.filter and therefore also pcv.create_labels makes the function speed a bottleneck when image size, mask complexity, and the number of objects/ROIs gets larger.

For the reviewer
See this page for instructions on how to review the pull request.

  • PR functionality reviewed in a Jupyter Notebook
  • All tests pass
  • Test coverage remains 100%
  • Documentation tested
  • New documentation pages added to plantcv/mkdocs.yml
  • Changes to function input/output signatures added to updating.md
  • Code reviewed
  • PR approved

@HaleySchuhl HaleySchuhl added the enhancement Enhancements to existing features label Aug 7, 2024
Copy link

deepsource-io bot commented Aug 7, 2024

Here's the code health analysis summary for commits f0e9d0d..a3939ce. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗

Code Coverage Report

MetricAggregatePython
Branch Coverage100%100%
Composite Coverage100%100%
Line Coverage100%100%
New Branch Coverage100%100%
New Composite Coverage100%100%
New Line Coverage100%, ✅ Above Threshold100%, ✅ Above Threshold

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@nfahlgren
Copy link
Member

One quick thing, does that maize image exist already? If so we don't need to include a copy of it in a separate docs folder

@HaleySchuhl
Copy link
Contributor Author

One quick thing, does that maize image exist already? If so we don't need to include a copy of it in a separate docs folder

I was looking for it but I think it might only exist in the tutorial repo(s). That reminds of something we talked about at dev meeting last week though, about ways to make downloading the repo smaller. Not sure if it would make a significant/any difference relevant to the effort it would require, but there are definitely replicate doc images that we could try to consolidate. Maybe the most glaring example of the duplication I've come across while looking for the maize image is the "original_img" in each of the pcv.rgb2__ doc pages.

@nfahlgren
Copy link
Member

Thanks Haley, you're right that the more images there are (docs and tests) the bigger the repo gets and the longer downloads take. Fortunately that only impacts folks installing from source code, the tests and docs are not included in the PyPI and conda packages

@nfahlgren nfahlgren added this to the PlantCV v4.4 milestone Aug 12, 2024
HaleySchuhl and others added 3 commits August 12, 2024 15:03
Copy link
Contributor

@k034b363 k034b363 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I tested it with circle, rectangle, custom, and multi ROI objects and it works just fine with all of them. I removed the docs page, but before it goes back in it'll have to be reviewed again to make sure the output names match the function docstring, but that was all I saw that I would've suggested changing.

@nfahlgren nfahlgren merged commit 248f983 into main Aug 16, 2024
5 checks passed
@nfahlgren nfahlgren deleted the quick_cutto branch August 16, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancements to existing features ready to review
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants